import { request } from '@ruifox-cms/utils'
//分页获取考试
export function selectExamPageExam(data) {
  return request({
    baseURL: "/10101_api",
    url: '/oltes/api/v1/exam/paging',
    method: 'post',
    data
  })
}
//分页获取考试 (前台用户)
export function userPagingExam(data) {
  return request({
    baseURL: "/10101_api",
    url: '/oltes/api/v1/exam/userPaging',
    method: 'post',
    data
  })
}
//按id获取考试
export function getExamExam(params) {
  return request({
    baseURL: "/10101_api",
    url: '/oltes/api/v1/exam/getExam',
    method: 'get',
    params
  })
}
//新增考试
export function createExam(data) {
  return request({
    baseURL: "/10101_api",
    url: '/oltes/api/v1/exam/create',
    method: 'post',
    data
  })
}
//编辑考试
export function updateExam(data) {
  return request({
    baseURL: "/10101_api",
    url: '/oltes/api/v1/exam/update',
    method: 'post',
    data
  })
}
//删除考试
export function deleteExamExam(params) {
  return request({
    baseURL: "/10101_api",
    url: '/oltes/api/v1/exam/deleteExam',
    method: 'post',
    params
  })
}
//更改考试状态
export function changeExamStatusExam(data) {
  return request({
    baseURL: "/10101_api",
    url: '/oltes/api/v1/exam/changeExamStatus',
    method: 'post',
    headers: {
      'Content-Type': 'application/x-www-form-urlencoded', // 设置请求头
    },
    data
  })
}
//同步考试配置
export function syncExamsConfigExam(data) {
  return request({
    baseURL: "/10101_api",
    url: '/oltes/api/v1/exam/syncExamsConfig',
    method: 'post',
    data
  })
}
//暂存考试配置
export function stagingExam(data) {
  return request({
    baseURL: "/10101_api",
    url: '/oltes/api/v1/exam/staging',
    method: 'post',
    data
  })
}
//复制考试配置  
export function copyAndNewExam(data) {
  return request({
    baseURL: "/10101_api",
    url: '/oltes/api/v1/exam/copyAndNew',
    method: 'post',
    headers: {
      'Content-Type': 'application/x-www-form-urlencoded', // 设置请求头
    },
    data
  })
}
//检查考试配置
export function checkPaperConfigExam(data) {
  return request({
    baseURL: "/10101_api",
    url: '/oltes/api/v1/exam/checkPaperConfig',
    method: 'post',
    data
  })
}